package com.kaizeli.website.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.kaizeli.website.pojo.entity.EmployeeAcceptance;
import com.kaizeli.website.pojo.dto.EmployeeAcceptanceDTO;
import com.kaizeli.website.response.Result;

import java.math.BigDecimal;
import java.util.List;

/**
 * 人员验收服务接口
 */
public interface EmployeeAcceptanceService extends IService<EmployeeAcceptance> {

    /**
     * 根据验收节点ID查询人员验收列表
     */
    Result<List<EmployeeAcceptanceDTO>> getEmployeeAcceptancesByAcceptanceId(Long acceptanceId);

    /**
     * 根据项目ID查询人员验收列表
     */
    Result<List<EmployeeAcceptanceDTO>> getEmployeeAcceptancesByProjectId(Long projectId);

    /**
     * 根据员工ID查询人员验收列表
     */
    Result<List<EmployeeAcceptanceDTO>> getEmployeeAcceptancesByEmployeeId(Long employeeId);

    /**
     * 创建人员验收记录
     */
    Result<EmployeeAcceptance> createEmployeeAcceptance(EmployeeAcceptance employeeAcceptance);

    /**
     * 更新人员验收记录
     */
    Result<EmployeeAcceptance> updateEmployeeAcceptance(EmployeeAcceptance employeeAcceptance);

    /**
     * 计算验收节点总工时
     */
    Result<BigDecimal> calculateTotalWorkHours(Long acceptanceId);

    /**
     * 计算验收节点总人工费用
     */
    Result<BigDecimal> calculateTotalLaborCost(Long acceptanceId);

    /**
     * 批量创建人员验收记录
     */
    Result<Void> batchCreateEmployeeAcceptances(List<EmployeeAcceptance> employeeAcceptances);
}
